<% LanguageParser.IncludeSection "report" if inside <> 1 then response.redirect "default.asp" end if if Request.QueryString("action") = "add" then Dim arrTemp, intTopicId, intPostId, intForumId, arrMaillist, strMail, i if Isempty(Request.Form("tid")) then intTopicId = Clng(objDAL.GetValue("Select ptopicid from aspbb_posts where pid = {0}", Array(Request.Form("pid")))) Else intTopicId = Clng(Request.Form("tid")) End if if Isempty(Request.Form("pid")) then intPostId = 0 Else intPostId = Clng(Request.Form("pid")) End if if Isempty(Request.Form("fid")) = "" then intForumId = Clng(objDAL.GetValue("Select tforumid from aspbb_topics where tid ={0}", Array(Request.form("intTopicId")))) Else intForumId = Clng(Request.Form("fid")) End if objDAL.Execute "Insert into aspbb_report(rtopicid,rpostid,rerror,ruserid,rforumid) values ({0}, {1}, {2}, {3}, {4})", Array(intTopicId, intPostId, Request.form("error"), userID, intForumId) strSQL = "SELECT aspbb_subcategory.sname, "&_ "aspbb_members.muser, aspbb_members.mmail "&_ "FROM (aspbb_subcategory INNER JOIN aspbb_groupmembers ON ((aspbb_subcategory.smoderators = aspbb_groupmembers.gmgid)"&_ "OR aspbb_groupmembers.gmgid = 2)) INNER JOIN aspbb_members ON aspbb_groupmembers.gmmid = aspbb_members.mid WHERE"&_ " aspbb_subcategory.sid = "& intForumId &" and aspbb_members.mreportnot = 1" objDAL.Open arrMaillist, strSQL, Array(intForumId) if Not EOF(arrMaillist) then strMail = "New report in the "& arrMaillist(0, i) &" forum. "& VbCrlf & strForumAddress &"/admin.asp?admin=reported" For i = 0 to Ubound(arrMaillist, 2) If not arrMaillist(2, i) = "" then Call aspbbEmail(strReplyAdress, strSenderName, arrMaillist(2, i), arrMaillist(1, i), "New Report", strMail) End if Next End if Response.Redirect("topic.asp?TID="& intTopicId &"") End if If Isempty(Request.QueryString("tid")) and Isempty(Request.QueryString("pid")) then Response.Write(langNoRepport) Else %>
<% =langReportPost %>

<%If isempty(Request.QueryString("tid")) = False Then%> "> <%Elseif isempty(Request.QueryString("pid")) = False then%> "> <%End if%> ">
<%End if%>